
//
//  QKGroupListGroupNameView.m
//  QKGroupListExample
//
//  Created by 丁乾坤 on 2016/12/8.
//  Copyright © 2016年 丁乾坤. All rights reserved.
//

#import "QKGroupListGroupNameView.h"
#import "UIView+QKFrame.h"
#import "QKGroupListButton.h"
@implementation QKGroupListGroupNameView


- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpView];
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

- (void)setUpView{
    CGFloat lineHeigh = 1.f;
    CGFloat btntop = lineHeigh;
    UIView *separetline = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.qk_width, lineHeigh)];
    separetline.backgroundColor = [UIColor grayColor];
    [self addSubview:separetline];
    self.groupNameBtn = [QKGroupListButton buttonWithType:UIButtonTypeCustom];
    self.groupNameBtn.frame = self.frame;
    self.groupNameBtn.qk_y = btntop;
    [self.groupNameBtn setImage:[UIImage imageNamed:@"rightaccess"] forState:UIControlStateNormal];
    [self.groupNameBtn setImage:[UIImage imageNamed:@"downaccess"] forState:UIControlStateSelected];
    [self.groupNameBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self addSubview:self.groupNameBtn];
}


@end
